package com.saozhu.Dao;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class MyProperties 
{
	private static MyProperties mp;
	private Properties p=new Properties();
	private MyProperties(String file){
		try {
			p.load(new FileInputStream(file));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public static MyProperties getMyProperties(String file)
	{
		if(mp==null)
		{
			mp=new MyProperties(file);
		}
		return mp;
	}
	public String getProperty(String key)
	{
		return p.getProperty(key);
	}
	
}
